<ui:composition 
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:pcc="http://java.sun.com/jsf/composite/pcc"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt">
    
    <script type="text/javascript">
		function beforeCloseTipoNodoForm(){
			var jqWrapper=jQuery('[id$="tipoNodoFormWrapper"]');
			jQuery('[id$="tipoNodoId"]',jqWrapper).val(" ");
			jQuery('[id$="tipoNodoNivel"]',jqWrapper).val(0);
			jQuery('[id$="tipoNodoNombre"]',jqWrapper).val(" ");
			var jqSelect=jQuery('[id$="tipoNodoEstadoRegistro"]',jqWrapper);	
			jQuery("option",jqSelect)[1].selected = true;	
		}
	</script>

<!-- 	<ice:form id="tipoNodoForm" partialSubmit="false"> -->
		<ice:panelPopup draggable="true" visible="#{fcTipoNodo.visibleTipoNodoForm and fcTabsNodo.tabbedTipoNodoVisible}" rendered="${fcTipoNodo.visibleTipoNodoForm}" style="z-index: 1000; position: fixed !important;" styleClass="ui-dialog ui-draggable">
			<f:facet name="header">
			    <ice:panelGroup styleClass="ui-dialog-titlebar" >
			        <ice:outputText styleClass="ui-dialog-title" value="${messages['titulo.addTipoNodo']}"/>
			        <h:commandLink styleClass="ui-dialog-titlebar-close" value="${serviquality['app.closePopup']}" action="#{fcTipoNodo.closePopupTipoNodoForm}" onclick="beforeCloseTipoNodoForm();"/>
			    </ice:panelGroup>
			</f:facet>
                
			<f:facet name="body">
			    <ice:panelGrid styleClass="ui-dialog-content formulario" id="tipoNodoFormWrapper">			 
					<ice:outputText styleClass="ui-dialog-title" value="${serviquality['tipoNodo.codigo']}" />
					<h:inputText id="tipoNodoId" value="${fcTipoNodo.tipoNodo.codigo}" partialSubmit="true" required="true"></h:inputText>   				
    				<ice:message for="tipoNodoId" />
    				
    				
			    	<ice:outputText styleClass="ui-dialog-title" value="${serviquality['tipoNodo.nivel']}"/>
					<ice:inputText id="tipoNodoNivel" value="${fcTipoNodo.tipoNodo.nivel}" partialSubmit="true" required="true">
						<f:validateLongRange minimum="0" maximum="10"/>						
			    	</ice:inputText>
			    	<ice:message for="tipoNodoNivel" />
			    	
			    	<ice:outputText styleClass="ui-dialog-title" value="${serviquality['tipoNodo.nombre']}"/>
					<ice:inputText id="tipoNodoNombre" value="${fcTipoNodo.tipoNodo.nombre}" partialSubmit="true" required="true">
						<f:validateLength maximum="100"/>
					</ice:inputText>
					<ice:message for="tipoNodoNombre" />
			    	
			    	<ice:outputText styleClass="ui-dialog-title" value="${serviquality['tipoNodo.descripcion']}"/>
			    	<ice:inputTextarea id="tipoNodoDescripcion" value="${fcTipoNodo.tipoNodo.descripcion}" rows="5" cols="40" partialSubmit="true" required="false">
     					<f:validateLength maximum="250" />
 					</ice:inputTextarea>
 					<ice:message for="tipoNodoDescripcion" />
			    	
			    	<ice:outputText styleClass="ui-dialog-title" value="${serviquality['tipoNodo.estadoRegistro']}"/>
			    	<ice:selectOneMenu id="tipoNodoEstadoRegistro" value="${fcTipoNodo.tipoNodo.estadoRegistro.codigo}" partialSubmit="true" required="true">
                        <f:selectItem itemLabel="#{serviquality['app.labelSelectVacio']}" itemValue=""/>
                        <c:forEach items="#{fcTipoNodo.estadosRegistro}" var="estadoRegistro">
                            <f:selectItem itemLabel="#{estadoRegistro.descripcion}" itemValue="#{estadoRegistro.codigo}"/>
                        </c:forEach>                        
                    </ice:selectOneMenu>
                    <ice:message for="tipoNodoEstadoRegistro" />
                    
                    <br/>
                    <ice:commandButton id="grabarTipoNodo" value="${serviquality['button.grabar']}" action="#{fcTipoNodo.grabarTipoNodo}" partialSubmit="false"/>																	                
			    </ice:panelGrid>
			</f:facet>       
		</ice:panelPopup>		
<!-- 	</ice:form>	 -->
</ui:composition>